package com.java.model;

import lombok.Data;

import java.io.Serializable;
import java.text.SimpleDateFormat;

@Data
public class UserVisitAction implements Serializable {
    private String date;//用户行为的日期
    private  String userId;//用户的ID
    private String action;//用户行为
    private String age;//用户年龄
    private String sex;//用户性别
    private String userName;//用户名
    private String thingId;//商品id
    private String thingName;//商品名称
    private String thingPrice;//商品单价
    private String evalId;//评论id
    private String evaLevel;//评论等级
    private String oederId;//订单id
    private String thingType;//商品类型
    private String totalPrice;//总价
    private String num;//数量
    private String channel;//渠道
    private String cost;//成本
    private String orderState;//订单状态


    /**
     * 各项之间用下划线连接
     * 一行是一种行为
     * @return
     */
    public String toString(){
        StringBuilder sb = new StringBuilder();
        sb.append(date + "_");
        sb.append(userId + "_");
        sb.append(action + "_");
        sb.append(age+"_");//用户年龄
        sb.append(sex + "_");//用户性别
        sb.append(userName + "_");//用户名
        sb.append(thingId + "_");
        sb.append(thingName + "_");
        sb.append(thingPrice + "_");
        sb.append(evalId + "_");
        sb.append(evaLevel + "_");
        sb.append(oederId + "_");
        sb.append(thingType + "_");
        sb.append(totalPrice + "_");
        sb.append(num + "_");
        sb.append(channel + "_");
        sb.append(cost + "_");
        sb.append(orderState + "_");

//        sb.append(pageId + "_");
//        sb.append(openPageTime + "_");
//        sb.append(actionTime + "_");
//        sb.append(searchKeyword + "_");
//        sb.append(clickCategoryId + "_");
//        sb.append(clickProductId + "_");
//        sb.append(collectCategoryId + "_");
//        sb.append(collectProductId + "_");
//        sb.append(orderCategoryIds + "_");
//        sb.append(orderProductIds + "_");
//        sb.append(payCategoryIds + "_");
//        sb.append(payProductIds + "_");
//        sb.append(cityId);
        return sb.toString();
    }
}
